{template header.html}
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		{$menu}<span>|</span><a href="{SYS_HELP_URL}11.html" target="_blank"><em>{lang('help')}</em></a>
	</div>
	<div class="bk10"></div>
	<div class="explain-col">
		<font color="gray">{lang('html-149')}</font>
	</div>
	<div class="bk10"></div>
	<div class="table-list">
		<form action="" method="post" name="myform" id="myform">
		<table width="100%">
		<thead>
		<tr>
			<th width="20" align="right"><input name="dr_select" type="checkbox" onClick="dr_selected()" />&nbsp;</th>
			<th width="30" align="center">{lang('html-322')}</th>
            <th width="50" align="center">Site</th>
            <th width="200" align="left">{lang('html-087')}</th>
			<th width="280" align="left">{lang('html-089')}</th>
			<th align="left" class="dr_option">{lang('option')}</th>
		</tr>
		</thead>
		<tbody>
		{loop $list $sid $t}
        {if $admin.adminid == 1 || ($admin.adminid > 1 && @in_array($sid, $admin.role.site))}
		<tr>
			<td align="right"><input name="ids[]" type="checkbox" class="dr_select" value="{$sid}" />&nbsp;</td>
			<td align="center"><a href="{dr_url('site/config',array('id' => $sid))}"><img src="{SITE_PATH}dayrui/statics/images/{php echo $t['setting']['SITE_CLOSE'] ? 0 : 1}.gif" /></a></td>
            <td align="center"><a href="{dr_url('site/config',array('id' => $sid))}">{$sid}</a></td>
            <td align="left"><input class="input-text" type="text" name="data[{$sid}][name]" value="{$t.name}" size="25" required /></td>
			<td align="left"><input class="input-text" type="text" name="data[{$sid}][domain]" value="{$t.domain}" size="40" required /></td>
			<td align="left" class="dr_option">
            <a class="ago" href="http://{$t.domain}{SITE_PATH}" target="_blank">{lang('go')}</a>{if $this->ci->is_auth('site/config')}<a class="aedit" href="{dr_url('site/config',array('id' => $sid))}">{lang('061')}</a>{/if}
			{if $this->ci->is_auth('site/del') && $sid > 1}<a class="adel" href="javascript:;" onClick="return dr_confirm_url('{lang('015')}','{dr_url('site/del', array('id' => $t.id))}');">{lang('del')}</a>{/if}
            <span id="dr_domain_{$sid}"></span>
            <script type="text/javascript">
                $.get("{dr_url('home/domain', array('domain' => $t.domain))}", function(data){
                    if (data) {
                        $("#dr_domain_{$sid}").html("<a href='{dr_url('site/config',array('id'=>$sid))}' style='color:red;'>域名解析异常</a>");
                    }
                });
            </script>
            </td>
		</tr>
        {/if}
		{/loop}
		<tr>
			<th align="right"><input name="dr_select" type="checkbox" onClick="dr_selected()" />&nbsp;</th>
			<td colspan="6" align="left">
			{if $this->ci->is_auth('site/edit')}<input type="submit" class="button noloading" value="{lang('edit')}" name="submit" onClick="return dr_confirm_set_all('{lang('015')}');" />&nbsp;{/if}
			</td>
		</tr>
		</tbody>
		</table>
		</form>
	</div>
</div>
{template footer.html}